Skip to content

Conversation

@veome22
Copy link
Collaborator

@veome22 veome22 commented Nov 20, 2024

Minor bug fix for the behavior of stellar spins to be retained after envelope loss. This is complementary to @ilyamandel's recent updates to stellar rotation models.

The previous behavior was to (inadvertently) retain the full angular momentum after envelope loss, which would spin up the remnant star very fast instead of losing the envelope's angular momentum.

Solved this by storing the rotational frequency at the beginning of the CE phase, and then assigning the spin back to the stars after envelope loss.

@veome22 veome22 added bug Something isn't working severity_minor This bug is not very severe urgency_moderate This is a moderately urgent issue labels Nov 20, 2024
@veome22 veome22 closed this Nov 20, 2024
@veome22 veome22 reopened this Nov 20, 2024
@ilyamandel
Copy link
Collaborator

Hi @veome22 ,

I thought my edits to

void Star::ResolveEnvelopeLossAndSwitch() {
double omega = Omega();
(void)SwitchTo(m_Star->ResolveEnvelopeLoss(true));
SetOmega(omega);
}

fixed precisely this issue; are you saying they do not?

Copy link
Collaborator

@jeffriley jeffriley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me - thanks @veome22. Just need dev pulled in, or fix the conflict by hand.

@veome22
Copy link
Collaborator Author

veome22 commented Nov 22, 2024

Hi @veome22 ,

I thought my edits to

void Star::ResolveEnvelopeLossAndSwitch() { double omega = Omega(); (void)SwitchTo(m_Star->ResolveEnvelopeLoss(true)); SetOmega(omega); }

fixed precisely this issue; are you saying they do not?

Hi @ilyamandel ! Yes, I am saying that those changes did not fix the problem. The mass of the stars must change at some point before ResolveEnvelopeLossAndSwitch() (maybe in ResolveCommonEnvelopeAccretion()). So the Omega() function returns the angular momentum conserved omega after mass loss, rather than the initial spin before CE.

@ilyamandel
Copy link
Collaborator

@veome22 -- yes, you are right, the mass is changed in ResolveCommonEnvelopeAccretion(), sorry I missed that!

@ilyamandel ilyamandel merged commit af9bb69 into dev Nov 24, 2024
2 checks passed
@ilyamandel ilyamandel deleted the ang_mom_consv branch November 24, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working severity_minor This bug is not very severe urgency_moderate This is a moderately urgent issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants